/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cf.service.impl;

/**
 *
 * @author Soltecn2
 */
import com.cf.dao.TbCategoriaDao;

import com.cf.dao.TbCategoriaDao;
import com.cf.modelo.TbCategoria;
import com.cf.service.TbCategoriaService;
import java.util.List;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author Soltecn2
 */
@SuppressWarnings("javadoc")
@Service("tbCategoriaServiceService")
@Transactional

public class TbCategoriaServiceImpl  implements TbCategoriaService{
    @Autowired
public TbCategoriaDao categoriaDao;
    

    public void add(TbCategoria categoria) {
        categoriaDao.add(categoria);
    }


    public void edit(TbCategoria categoria) {
      categoriaDao.edit(categoria);
    }


    public void delete(int categoriaId) {
        categoriaDao.delete(categoriaId);
    }


    public TbCategoria getCategoria(int categoriaId) {
       return categoriaDao.getCategoria(categoriaId);
    }


 

  public  List<TbCategoria> listCategoria(){
      
  return  categoriaDao.listCategoria();
  }
  
  
  
  
  
}
